home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
util
/
misc
/
DragBox.lha
/
DragBox.txt
< prev
next >
Wrap
Text File
|
1999-02-08
|
11KB
|
332 lines
-DragBox- v1.8 (08.02.19999)
Introduction
************
You can open all windows with dragging them to the place you want
before the window itself are opened.
Distribution
************
Copyright (C) 1998-1999 Juha 'Asa' Pinola
DragBox is available as freeware. That is, it may be freely distributed
in unmodified form with no changes what so ever, but you may not charge
more than a nominal fee covering distribution costs. However, donations
are welcome.
If you use this software in a commercial or shareware software product,
please consider giving the author and preferably each one of the
contributors an original or registered version of your work.
If you wish to distribute this software with a hardware product, contact
the author. Distribution of DragBox with hardware products is not free.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
****************************************
Installing
----------
Just copy DragBox to c:DragBox or somewhere else.
And try run the included DragShell.info from its icon
and see what this program does.
For faster response insert a line:
"resident c:dragbox pure >nil:" to your s:startup-sequence
or s:user-startup
Works fine on any 68k CPUs.
(if doesn't work with KS2.? or lower, please let me know)
****************************************
The Author
----------
The author can be reached at the following addresses:
Electronic mail
jpinola@cs.joensuu.fi
World-Wide Web
http://cs.joensuu.fi/~jpinola
IRC: Asa/#amigafin/#amycoders
****************************************
Example usage:
newcli from s:shell-startup window con:`DragBox`/DragShell/CLOSE
newcli from s:shell-startup window kcon:`DragBox center font times.font`/Dragbox rules/CLOSE
newcli window con:`DragBox w 300 h 100`/DragShell/CLOSE
newcli window con:`DragBox 10 10 300 100 c`/DragShell/CLOSE
newcli window con:`DragBox col_text ffffff`/DragShell/CLOSE
Or edit sys:system/shell.info
and edit the tooltypes:
WINDOW=con:`DragBox w 600 h 300 c min_w 200 min_h 50`/Shell/CLOSE
You can change the return format:
DragBox format "left %ld top %ld " (Only x,y coords)
DragBox format "x=%ld y=%ld w=%ld h=%ld" (All coords)
Or change the environment variable:
DragBox env DRAGBOX_DEFAULTS2
To clone a window make an environment variable:
setenv DRAGBOX_CLONE "RELATIVE SIZE_FROM_ACTIVE MIDDLE"
Then add a hotkey to somewhere (ie. MCP's Execute command hotkey)
And se execution line to:
newcli from s:shell-startup window con:`dragbox env DRAGBOX_CLONE`/Clone Shell/CLOSE
To set alternative position for shell window:
DragBox format "%ld/%ld/%ld/%ld/%s///ALT %ld/%ld/%ld/%ld" ax +10 ay -40 aw 100 ah 400
Sets alternative position to X +10 Y -40 Width 100 Height 400
For MUI programs:
MUI_Program.exe `dragbox MUI_PREFS <name of the MUI_Program> MUI_WIN <id for window>`
ie.
Miami `dragbox MUI_PREFS mui/Miami.1.prefs MUI_WIN MAIN`
Miami `dragbox MUI_PREFS mui/Miami.1.prefs MUI_WIN MAIN MUI_DEF`
Amirc `dragbox MUI_PREFS mui/AMIRC.1.prefs MUI_WIN CONN`
****************************************
Command line parameters:
"X=DEF_X/N,Y=DEF_Y/N,W=DEF_W/N,H=DEF_H/N,C=CENTER/S,
L=LEFT/S,M=MIDDLE/S,R=RIGHT/S,F=FONT/K,FS=FSIZE/N/K,
MIW=MIN_W/N/K,MIH=MIN_H/N/K,MAW=MAX_W/N/K,MAH=MAX_H/N/K,
CBACK=COL_BACK/K,CBRIGHT=COL_BRIGHT/K,CDARK=COL_DARK/K,CSHADOW=COL_SHADOW/K,CTEXT=COL_TEXT/K,
WX=WIN_X/N/K,WY=WIN_Y/N/K,NOW=NOWIN/S,
FO=FORMAT/K,ENV/K,
TO=TIME_OUT/N/K,AD=ADRAG/S,
REL=RELATIVE/S,SFA=SIZE_FROM_ACTIVE/S,
PTS=PASSTHRU_STRING/K,AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K,
MP=MUI_PREFS/K,MW=MUI_WIN/K,MD=MUI_DEF/S,
SHADOW_HEIGHT/N/K,LINE_PATTERN/K,LINE_DRAWMODE/N/K,
NOBLOCK/S"
X = Default x
Y = Default y
W = Default width
H = Default height
C = Dragbox is in the middle of mouse pointer
L = Left button
M = Middle button
R = Right button
F = Name of the font
FS = Size of the font
MIN_W = Minimum width allowed
MIN_H = Minimum height allowed
MAX_W = Maximum width allowed
MAX_H = Maximum height allowed
COL_BACK = Color for background (example COL_BACK 23ff00 is 0x23 , for red 0xff for green , and 0x00 for blue)
COL_BRIGHT = Color for bright edge of window
COL_DARK = Color for dark edge of window
COL_SHADOW = Color for shadow of text
COL_TEXT = Color for text
WIN_X = left edge coord for the coords window
WIN_Y = top edge coord for the coords window
NOWIN = no coords window
FORMAT = Format of return string. %ld for number (x,y,w,h)
ENV = Set name of the environment variable. (use only names no paths! default: DRAGBOX_DEFAULT)
TIME_OUT = dragbox time out. -1 for infinite (default is 20 intuiticks aprox)
ADRAG = Box can be dragged after resize operation
RELATIVE = Dragbox is relative to starting position of mouse
SIZE_FROM_ACTIVE = Starting size is taken from currently active window (disables CENTER/S and ADRAG/S)
PASSTHRU_STRING = Puts this string to %s position in format string
ALT_X = Alternative x (absolute values. use - or + sign to relative values)
ALT_Y = Alternative y
ALT_W = Alternative w
ALT_H = Alternative h
MUI_PREFS = For MUI programs. give location of programs MUI prefs without the ENV: or ENVARC: assign ie. "MUI/PROGRAM.1.PREFS"
Works only when Main window is Snapshotted
MUI_WIN = ID chars for window in the MUI_PREFS file. ie. For "Miami" the main window is "MAIN"
You must view the MUI programs .prefs file and see the window ID's (usually 4 letters at the end of the .prefs)
Don't use if you don't no what you are doing.
MUI_DEF = Default values of the Main window from MUI_PREFS
"Check the homepage http://cs.joensuu.fi/miu/miu.html for DragBox_IDs.txt"
SHADOW_HEIGHT = Height of the window from screen (how far the shadow is drawn from the window)
LINE_PATTERN = Line drawing pattern in hex. (16 pix pattern)
0xFFFF full lines {----------------} (default)
0x0000 nothing { }
0xAAAA every other dot {- - - - - - - - }
0xFF00 {-------- }
0xAA55 {- - - - - - - -}
LINE_DRAWMODE = Sets draw mode for the line (I'm not sure does this even alter anything)
0 -> COMPLEMENT (default)
1 -> COMPLEMENT | JAM2
NOBLOCK = Disables Layer locks. If you get lock ups then use this flag.
****************************************
Env variable:
DRAGBOX_DEFAULTS = [as command line]
Example: ( "setenv DRAGBOX_DEFAULTS DEF_W 600 MIDDLE FONT topaz.font FSIZE 8" )
( "setenv DRAGBOX_DEFAULTS COL_SHADOW 000000 COL_TEXT ffffff" )
(copy env:DRAGBOX_DEFAULTS to envarc:)
****************************************
Notes and bugs:
Use middle or right mouse button with this (right is default),
because WB uses left button with it's dragbox..
And left button deactivates the coords window anyway, if not clicked on it,
and quits dragbox.
Using very high SHADOW_HEIGHT causes window to open too big and when the window
does not fit to the screen you'll get crappy window.
If your computer locks up then use NOBLOCK/S switch.
Dragbox quits when:
1. Selected button is pressed and released
2. When coord window is deactived (if you have sunpopup or something, sorry)
3. Command line and/or env variable is corrupt. (returns factory defaults)
4. Keys Return/Esc/Spacebar is pressed
5. The format string format is 4-integers 1-string 4-integers ONLY!
ie. "%ld %ld %ld %ld %s %ld %ld %ld %ld"
NO! "%ld %ld %s %ld %s %ld %ld" Propably crashes
6. Atleast 4096 stack
(factory defaults:
"X 0 Y 0 W 200 H 200
RIGHT FONT webfixed.font FSIZE 12
MIN_W 30 MIN_H 30 MAX_W 10000 MAX_H 10000
COL_BACK 777777 COL_BRIGHT ffffff COL_DARK 000000 COL_SHADOW 333333 COL_TEXT cccccc"
FORMAT "%ld/%ld/%ld/%ld" ENV DRAGBOX_DEFAULT
TIME_OUT 20
MUI_WIN MAIN
SHADOW_HEIGHT 4 LINE_PATTERN 0xffff LINE_DRAWMODE 0"
)
****************************************
History:
--------------
v 1.8
+ NOBLOCK/S added
+ Shadow of the coords window is hopefully working with gfxcards
--------------
v 1.7
+ SHADOW_HEIGHT/N/K added
+ LINE_PATTERN/K added
+ LINE_DRAWMODE/N/K added
+ now all gfx updates to the screen is freezed during dragbox
+ Shadow added to the coords window
- The LockLayers() func hangs up whole computer somehow.
If someone knows how to disable screen rendering more safely
please let me know.
(Can be switched of with NOBLOCK/S)
--------------
v 1.6
+ MW=MUI_WIN/K added
+ more fixes for MUI dragging
--------------
v 1.5
+ MD=MUI_DEF/S added
+ some fix with MUI dragging
--------------
v 1.4
+ MP=MUI_PREFS/K added
--------------
v 1.3
+ PTS=PASSTHRU_STRING/K added
+ AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K added
- Need more stack now ?! If you run this from Shell.info then you
should have atleast 4096 stack set. Lockup if not enough stack.
--------------
v 1.2
+ SFA=SIZE_FROM_ACTIVE/S added
+ REL=RELATIVE/S added
--------------
v 1.1
+ Check for too small width/height. (less than 1 x 1)
--------------
v 1.00
+ Less flickering lines
+ ADRAG/S added
+ TIME_OUT/N/K added
+ WIN_X/N/K,WIN_Y/N/K,NOWIN/S added
+ Some fixes
--------------
v 1.00b
--------------
v 0.99b
+ ENV/K added
--------------
v 0.99
+ FORMAT/K added
--------------
v 0.98
+ COL_BACK/K,COL_BRIGHT/K,COL_DARK/K,COL_SHADOW/K,COL_TEXT/K added
+ MIN_W/N/K,MIN_H/N/K,MAX_W/N/K,MAX_H/N/K added
--------------
v 0.94
+ CENTER/S fixed
+ Only one global variable now (DRAGBOX_DEFAULTS)
Old variables are now ignored, kill them.